﻿package 
{
	import pages.NextPage;
	import org.molamil.acto.core.events.ConfLoadEvent;

	import flash.display.Sprite;

	import pages.StartupPage;
	
	public class Main extends Sprite {
		
		
		StartupPage; NextPage;
		
		private var controller : Controller;
		
		public var container:Sprite;
		
		public function Main()
		{
			
			container = new Sprite();
			addChild(container);
			
			// Launch your application by right clicking within this class and select: Debug As > FDT SWF Application
			controller = new Controller(this);
			controller.addEventListener(ConfLoadEvent.COMPLETE, controllerCompleteHandler, false, 0, true);
			controller.init();
		}

		private function controllerCompleteHandler(event : ConfLoadEvent) : void {
			trace('controllerCompleteHandler: ' + (controllerCompleteHandler));
			dispatchEvent(new NavigationEvent(NavigationEvent.STARTUP));
		}
	}
}
